<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"
    import="java.io.PrintWriter, java.sql.ResultSet,
    		cn.edu.nju.software.model.user.Information" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%
	String username = (String) application.getAttribute("username");
	if (username == null || username.equals("")) {
		PrintWriter printWriter = response.getWriter();
		printWriter.println("<script>alert('Please login first!');"
						+ "window.location.href='../index.jsp';</script>");
	}
%>

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link type="text/css" rel="stylesheet" href="../css/index_header_footer.css" />
	<link type="text/css" rel="stylesheet" href="../css/index_sidebar.css" />
	<link type="text/css" rel="stylesheet" href="../css/user/infor.css" />
	<title>Hello <%= username %>&nbsp;个人信息</title>
</head>

<body>
	<div id="header">
	
		<div id="login">
			Hello, <%= username %>&nbsp;!&nbsp;&nbsp;&nbsp;
			<a href="../index.jsp">退出</a>
		</div>
		
		<div id="menu">
			<a href="home.jsp"><img src="../images/menu_homepage.png" alt="首页" /></a>
			<a href="vip.jsp"><img src="../images/menu_vip.png" alt="VIP专区" /></a>
			<a href="booking.jsp"><img src="../images/menu_booking.png" alt="优先购票" /></a>
			<a href="information.jsp"><img src="../images/menu_information.png" alt="个人资料" /></a>
		</div>
		
	</div>
	
	
	<div id="sidebar">
		
		<div id="activity" class="sidebar_cell">
			<a href="" class="sidebar_cell_link">更多--&gt;</a>
			<span class="sidebar_cell_title">影城活动</span>
			<div id="activity_list">
				<ul>
					<li><a href="">春节优惠活动</a></li>
					<li><a href="">看《最强喜事》，拿“百元”现金红包“</a></li>
					<li><a href="">新年影城”春联“征集，获胜优秀作品</a></li>
					<li><a href="">影城2月影讯</a></li>
					<li><a href="">好礼相送，幸运抽奖</a></li>
					<li><a href="">新春”春联“征集”</a></li>
				</ul>
			</div>
		</div>
		
		<div id="information" class="sidebar_cell">
			<a href="" class="sidebar_cell_link">更多--&gt;</a>
			<span class="sidebar_cell_title">新片资讯</span>
			<div class="movie_info_column">
				<p>
					<a href=""><img src="../images/movie/old_boy.jpg" /></a>
					<br />
					<a href="">老男孩</a>
					<br />
					<a href=""><img src="../images/movie/inception.jpg" /></a>
					<br />
					<a href="">盗梦空间</a>
				</p>
			</div>
			<div class="movie_info_column">
				<p>
					<a href=""><img src="../images/movie/if_you_are_the_one_2.jpg" /></a>
					<br />
					<a href="">非诚勿扰2</a>
					<br />
					<a href=""><img src="../images/movie/bullet_fly.jpg" /></a>
					<br />
					<a href="">让子弹飞</a>
				</p>
			</div>
		</div>
		
		<div id="poll" class="sidebar_cell">
			<span class="sidebar_cell_title">网上调查</span><br />
			<div id="poll_option">
				你最喜欢影院组织的哪些活动？
				<form>
					<p>
						<input type="checkbox" name="favor[]" value="discount" />观看影片及卖品的优惠<br />
						<input type="checkbox" name="favor[]" value="meeting" />影片主创及明星见面会<br />
						<input type="checkbox" name="favor[]" value="exhibition" />经典影片回顾展<br />
						<input type="submit" value="投票" />
					</p>
				</form>
			</div>
		</div>
		
	</div>
	
	<div id="content">
		
		<div id="navigation">
			<a href="information.jsp">编辑信息</a><br />
			<a href="password.jsp">修改密码</a><br />
			<a href="status.jsp">会员卡状态</a>
		</div>
		
		<div id="edit">
			<div id="edit_infor">
				<form method="post" action="../ChangeInformation.do">
					<%
					Information infor = new Information();
					ResultSet rs = infor.fetInformation(username);
					if (rs != null) {
					%>
						<table>
							<tr class="color_row">
								<td>性别</td>
								<td>
									<%
									if (rs.next()) {
										
										String gender = rs.getString(8);
										if (gender == "male") {
											
										} else {
											
										}
									}
									%>
									<input type="radio" name="gender" value="male" checked="checked" />&nbsp;男
									<input type="radio" name="gender" value="female" />&nbsp;女
								</td>
							</tr>
							<tr>
								<td>年龄</td>
								<td>
									<input type="radio" name="age" value="50" />50后
									<input type="radio" name="age" value="60" />60后
									<input type="radio" name="age" value="70" />70后<br />
									<input type="radio" name="age" value="80" checked="checked" />80后
									<input type="radio" name="age" value="90" />90后
									<input type="radio" name="age" value="00" />00后
								</td>
							</tr>
							<tr class="color_row">
								<td>爱看的电影类型：</td>
								<td>
									<select name="type">
										<option value="comedy">喜剧片</option>
										<option value="action">动作片</option>
										<option value="love">爱情片</option>
										<option value="science">科幻片</option>
										<option value="war">战争片</option>
										<option value="adventure">冒险片</option>
										<option value="terror">恐怖片</option>
										<option value="animation">动画片</option>
										<option value="literature">文艺片</option>
									</select>
								</td>
							</tr>
							<tr>
								<td></td>
								<td>
									<input type="submit" value="确定" />
									<input type="reset" value="重新填写" />
								</td>
							</tr>
						</table>
					<%
					}
					%>
				</form>
			</div>
		</div>
	
	</div>
	
	<div id="footer">
		<p>
			Copyright &copy; <a href="mailto:zyy08@software.nju.edu.cn">张迎亚</a>·南京大学·软件学院·2011春节
		</p>
	</div>
	
</body>
</html>